TARGET = export.exe

CC = arm-linux-gnueabihf-gcc

CFLAGS = -Wall -Wextra -Werror -O2 -g

LDFLAGS = -static

LIBS = -lrt

SRCS = $(wildcard *.c)

OBJS = $(SRCS:.c=.o)

$(TARGET): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

.PHONY: clean
clean:
	rm -f $(OBJS) $(TARGET)

.PHONY: distclean
distclean: clean
	rm -f Makefile

.PHONY: install
install: $(TARGET)
	cp $(TARGET) $(PREFIX)/bin